<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.w3.org/1999/xhtml">
<head th:replace="studentUnion/_fragments :: head(~{::title})">
    <meta charset="UTF-8">
    <title>角色信息</title>
    <link href="../../static/layui/css/layui.css" rel="stylesheet" />
    <script src="../../static/layui/layui.js" type="text/javascript"></script>
</head>
<body>
<!-- 角色展示位置 -->
<table id="roleGrid"  lay-filter="roleGrid"></table>
<!-- 操作  编辑 删除 按钮 -->
<script type="text/html" id="roleAddBtn">
    <button type="button" class="layui-btn layui-btn-normal " style="margin: 10px 0 0 10px;" onclick="add({type:'role'})" shiro:hasPermission="system:role:add">
        <i class="layui-icon">&#xe61f;</i>添加
    </button>
</script>
<script type="text/html" id="rowBtns">
    <button class="layui-btn layui-btn-sm " lay-event="edit" shiro:hasPermission="system:role:edit">
        <i class="layui-icon">&#xe642;</i> 编辑
    </button>

    <button class="layui-btn layui-btn-sm layui-btn-danger" lay-event="detele" shiro:hasPermission="system:role:del">
        <i class="layui-icon">&#xe640;</i> 删除
    </button>

    <button class="layui-btn layui-btn-primary layui-border-black layui-btn-sm" onclick="toSetFun('{{d.roleId}}','{{d.roleName}}')" shiro:hasPermission="system:role:allot">
        <i class="layui-icon">&#xe672;</i> 功能分配
    </button>
</script>
<!-- 弹出层中的表单模板 -->
<th:block th:replace="studentUnion/_fragments :: roleTemplate"></th:block>


</body>

<!-- 功能类型 处理后 显示的文本 -->
<script type="text/html" id="typeText">
    {{# if(d.funType==1){ }}
    <span class="layui-badge">菜单</span>
    {{# }else{ }}
    <span class="layui-badge layui-bg-green">按钮</span>
    {{# } }}
</script>
</html>
